import 'package:flutter/material.dart';
import '../style/color.dart';
import '../style/text.dart';

// 主题按钮
class ThemeActiveButton extends StatelessWidget {
  ThemeActiveButton(this.text, {this.onPressed, this.isActive = false});
  final String text;
  final VoidCallback onPressed;
  final bool isActive;
  @override
  Widget build(BuildContext context) {
    return MaterialButton(
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(6)),
      onPressed: isActive ? onPressed : null,
      disabledColor: subThemeColor,
      height: 45,
      color: mainThemeColor,
      child: Text(text, style: normalWhiteStyle),
    );
  }
}
